package org.ehe.finance.voucher.domain.vo;

import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.ehe.finance.voucher.domain.ErpFinanceVoucher;
import org.ehe.finance.voucher.domain.bo.VoucherDetailCreateBo;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author :zhangnn
 * @className :ErpFinanceVoucherVo
 * @description: TODO
 * @date 2025-08-25 09:29:33
 */
@Data
@AutoMapper(target = ErpFinanceVoucher.class)
public class ErpFinanceVoucherVo {

    @Schema(description = "凭证ID")
    private Long id;

    @Schema(description = "凭证号")
    private String voucherNo;

    @Schema(description = "凭证类别ID")
    private Long voucherTypeId;

    @Schema(description = "凭证类别编码")
    private String typeCode;

    @Schema(description = "凭证类别名称")
    private String typeName;

    @Schema(description = "凭证字")
    private String prefix;

    @Schema(description = "凭证日期")
    private LocalDate voucherDate;

    @Schema(description = "会计期间:YYYY-MM")
    private String period;

    @Schema(description = "附件张数")
    private Integer attachmentCount;

    @Schema(description = "借方金额合计")
    private BigDecimal totalDebit;

    @Schema(description = "贷方金额合计")
    private BigDecimal totalCredit;

    @Schema(description = "摘要")
    private String abstractInfo;

    @Schema(description = "出纳员ID")
    private Long cashierId;

    @Schema(description = "出纳员姓名")
    private String cashierName;

    @Schema(description = "记账员ID")
    private Long accountantId;

    @Schema(description = "记账员姓名")
    private String accountantName;

    @Schema(description = "审核员ID")
    private Long reviewerId;

    @Schema(description = "审核员姓名")
    private String reviewerName;

    @Schema(description = "凭证状态:1制单,2审核,3记账,4结账")
    private Integer voucherStatus;

    @Schema(description = "凭证状态名称")
    private String voucherStatusName;

    @Schema(description = "来源类型:1手工录入,2系统生成")
    private Integer sourceType;

    @Schema(description = "来源类型名称")
    private String sourceTypeName;

    @Schema(description = "来源单据ID")
    private Long sourceId;

    @Schema(description = "来源单据号")
    private String sourceNo;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建人姓名")
    private String createByName;

    @Schema(description = "更新人姓名")
    private String updateByName;


    /**
     * 分录明细
     */
    private List<ErpFinanceVoucherDetailVo> detailVoList;
}
